<#import "/macro.ftl" as m>
<@m.page_header title='后台' />
<div id="page-content-wrapper">

    <div id="page-title">
        <h3>
        媒体管理
        </h3>
        <div id="breadcrumb-right">
            <div class="float-right">
            	<a href="/safeguardmedium/safeguardmediumadd" class="btn medium primary-bg">
                    <span class="button-content">
                    <i class="glyph-icon icon-cog float-left"></i>
                    添加
                    </span>
                </a>
            </div>
        </div>
    </div>
    <div id="page-content">
	    <table class="table" id="exp">
	    <thead>
	    <tr>
	    	<th>媒体</th>
	        <th>logo</th>
	        <th>链接</th>
	        <th>序号</th>
	        <th>置顶</th>
	        <th></th>
	    </tr>
	    </thead>
	    <tbody>
		<#list safeguardmediums.list as safeguardmediums>
	    <tr>
	    	<td>${safeguardmediums.medium}</td>
	        <td><img src="${safeguardmediums.logo}"></td>
	        <td>${safeguardmediums.link}</td>
	        <td>${safeguardmediums.sequence}</td>
	        <td><#if safeguardmediums.isTop>是<#else>否</#if></td>
	        <td class="center">
	            <div class="dropdown">
	            <a href="javascript:;" title="" class="btn medium bg-blue" data-toggle="dropdown">
	                                        <span class="button-content">
	                                            <i class="glyph-icon font-size-11 icon-cog"></i>
	                                            <i class="glyph-icon font-size-11 icon-chevron-down"></i>
	                                        </span>
	            </a>
	            <ul class="dropdown-menu float-right">
	
	                <li>
	                    <a href="/safeguardmedium/safeguardmediumupdate/${safeguardmediums.id}" title="">
	                        <i class="glyph-icon icon-edit mrg5R"></i>
	                        修改
	                    </a>
	                </li>
	                <li>
	                    <a id="del" title="" class="font-red" onclick="deletesafeguardmedium(${safeguardmediums.id});">
	                        <i class="glyph-icon icon-edit mrg5R"></i>
	                        删除
	                    </a>
	                </li>
	            </ul>
	        </div>
	        </td>
	    </tr>
		</#list>
	    </tbody>
	    <tfoot>
	    <tr>
	   	 	<th>媒体</th>
	        <th>logo</th>
	        <th>链接</th>
	        <th>序号</th>
	        <th>置顶</th>
	        <th></th>
	    </tr>
	    </tfoot>
	    </table>
	</div>
</div> 

</div>

<script type="text/javascript">
$(document).ready(function() {
	<#if msg!=null>
	$.jGrowl("${msg}", {sticky:!1,position:'bottom-right',theme:'bg-green'});
	</#if>
	
	
});

function deletesafeguardmedium(id){
		$.messager.confirm("提示", "确认删除该媒体机构吗？", function() { 
			location.href="/safeguardmedium/safeguardmediumdelete/"+id;
		});
}
		

</script>


